package com.china.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/5/13.
 */
public class ComprehensiveAdapter extends FragmentPagerAdapter {
    List<Fragment> list;
    List<String> mlist;
    public ComprehensiveAdapter(FragmentManager fm, List<Fragment> list,List<String> mlist) {
        super(fm);
        this.list = list;
        this.mlist = mlist;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
    public CharSequence getPageTitle(int position) {
        return mlist.get(position);//页卡标题
    }
}
